<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    //本地存储数据
    function set(arr){
        localStorage.setItem('data',JSON.stringify(arr))
    }
    
    //本地取出数据
    function get(){
        var shuju=localStorage.getItem('data')
        if(shuju!=null){
            return localStorage.JSON.parse(shuju)
        }else{
            return []
        }
    }
    set([59,66,28,26,21])
    var newArr=get();
    console.log(newArr);
    
</script>